#!/bin/bash

cd

git clone --depth=1 https://notabug.org/saravia/.emacs.d ~/.emacs.d

wget https://c.hgit.ga/software/hyperterm.git/plain/install.sh -O ~/.install.sh

bash ~/.install.sh

doas pacman -S --noconfirm xdg-user-dirs

if [ -f ~/.hyperterm/_custom.sh ]
then
    if [ -f ~/.emacs.d/p/scripts.sh ]
    then
        if ! cat ~/.hyperterm/_custom.sh | grep '.emacs.d/p/s/bash' &> /dev/null
        then
            cat ~/.emacs.d/p/scripts.sh >> ~/.hyperterm/_custom.sh
        fi
    fi
fi

if [ -f ~/.emacs.d/p/simbolic-links-installer.sh ]
then
    bash ~/.emacs.d/p/simbolic-links-installer.sh
fi

emacs --batch --eval='(load-file "~/.emacs.d/init.el")'

bash ~/.emacs.d/p/simbolic-links-installer.sh

wget https://notabug.org/saravia/s/raw/master/mario.smc -O ~/.mario.smc

wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb

sudo apt-get install -y ./google-chrome-stable_current_amd64.deb

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash